package com.cmcc.zysoft.sellmanager.model;
// Generated 2013-6-8 15:09:26 by Hibernate Tools 3.2.2.GA


import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * Medal generated by hbm2java
 */
@Entity
@Table(name="tb_c_medal")
public class Medal  implements java.io.Serializable {


     private String medalId;
     private String medalName;
     private String medalPicture;
     private BigDecimal medalLevel;
     private String medalType;
     private String medalSysId;
     private String mark1;
     private String mark2;
     private Set<EmployeeMedal> employeeMedals = new HashSet<EmployeeMedal>(0);

    public Medal() {
    }

	
    public Medal(String medalId) {
        this.medalId = medalId;
    }
    public Medal(String medalId, String medalName, String medalPicture, BigDecimal medalLevel,String medalType, String medalSysId, String mark1, String mark2, Set<EmployeeMedal> employeeMedals) {
       this.medalId = medalId;
       this.medalName = medalName;
       this.medalPicture = medalPicture;
       this.medalLevel = medalLevel;
       this.medalType = medalType;
       this.medalSysId = medalSysId;
       this.mark1 = mark1;
       this.mark2 = mark2;
       this.employeeMedals = employeeMedals;
    }
   
    @GenericGenerator(name = "generator", strategy = "uuid.hex")
   	@Id
   	@GeneratedValue(generator = "generator")
    @Column(name="medal_id", unique=true, nullable=false, length=32)
    public String getMedalId() {
        return this.medalId;
    }
    
    public void setMedalId(String medalId) {
        this.medalId = medalId;
    }
    
    @Column(name="medal_name", length=80)
    public String getMedalName() {
        return this.medalName;
    }
    
    public void setMedalName(String medalName) {
        this.medalName = medalName;
    }
    
    @Column(name="medal_picture", length=40)
    public String getMedalPicture() {
        return this.medalPicture;
    }
    
    public void setMedalPicture(String medalPicture) {
        this.medalPicture = medalPicture;
    }
    
    @Column(name="medal_level", precision=10)
    public BigDecimal getMedalLevel() {
        return this.medalLevel;
    }
    
    public void setMedalLevel(BigDecimal medalLevel) {
        this.medalLevel = medalLevel;
    }
    
    @Column(name="medal_type", precision=10)
    public String getMedalType() {
        return this.medalType;
    }
    
    public void setMedalType(String medalType) {
        this.medalType = medalType;
    }
    
    @Column(name="mark1", length=200)
    public String getMark1() {
        return this.mark1;
    }
    
    public void setMark1(String mark1) {
        this.mark1 = mark1;
    }
    
    @Column(name="mark2", length=200)
    public String getMark2() {
        return this.mark2;
    }
    
    public void setMark2(String mark2) {
        this.mark2 = mark2;
    }
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="medal")
    public Set<EmployeeMedal> getEmployeeMedals() {
        return this.employeeMedals;
    }
    
    public void setEmployeeMedals(Set<EmployeeMedal> employeeMedals) {
        this.employeeMedals = employeeMedals;
    }
    
    @Column(name="medal_sys_id", length=200)
	public String getMedalSysId() {
		return medalSysId;
	}

	public void setMedalSysId(String medalSysId) {
		this.medalSysId = medalSysId;
	}




}


